package com.stu.student_back_end.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.stu.student_back_end.entity.TblNoHere;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 缺寝mapper层接口
 */
@Mapper
public interface TblNoHereMapper extends BaseMapper<TblNoHere> {

    //查询五天内的缺寝数
    @Select("select count(*) from tbl_nohere where createTime between date_sub(now(),interval 15 day) and curdate()")
    int queryNoHereCount();
}
